class people():
    def __init__(self, name, age, huafei, iphone, dianchi, screen, daijitime, jifen):
        self.name = name
        self.age = age
        self.huafei = huafei
        self.iphone = iphone
        self.dianchi = dianchi
        self.screen = screen
        self.daijitime = daijitime
        self.jifen = jifen

    def send(self, str):
        print(f'{self.name}发送的短信为%s' % str)

    def dadianhua(self, time, iphone):
        if self.huafei < 1:
            print("花费不足")
        elif self.iphone is None:
            print("电话号码为空")
        elif self.iphone > 1 and self.iphone is not None:
            print("你已经拨通了%d的电话" % iphone)
            if 0 < time <= 10:
                self.huafei = float(self.huafei) - time
                self.jifen = float(self.jifen) + 15 * time
                print(f"你的话费剩余{self.huafei},你的积分为{self.jifen}")
            elif 10 < time <= 20:
                self.huafei = float(self.huafei - 10) - time * 0.8
                self.jifen = float(self.jifen) + time * 39
                print(f"你的话费剩余{self.huafei},你的积分为{self.jifen}")
            elif time > 20:
                self.huafei = float(self.huafei) - time * 0.65
                self.jifen = float(self.jifen) + time * 48
                print(f"你的话费剩余{self.huafei},你的积分为{self.jifen}")
            else:
                print("你输入的时间不对")

        else:
            print("拨打电话失败")


li = people("李四", 30, 50, 1883920, "3000ma", "8*4", "200h", 10)
li.send("明天你好")
li.dadianhua(13, 1888)
